package com.min.main.entity;

import com.baomidou.mybatisplus.annotation.*;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.min.common.entity.BaseEntity;

import java.util.Date;
import java.util.List;

import com.min.common.entity.IUser;
import com.min.common.serializer.LongArray2StringSerialize;
import lombok.Data;

/**
 * 用户表
 * 
 * @author fengt
 * @date 2021-06-23 11:41:08
 */
@Data
@TableName("min_user")
public class UserEntity extends BaseEntity implements IUser {
	private static final long serialVersionUID = 1L;

	/**
	* 账户名
	*/
	@TableField(whereStrategy = FieldStrategy.NOT_EMPTY)
	private String account;
	/**
	* 密码
	*/
	@TableField(whereStrategy = FieldStrategy.NOT_EMPTY)
	private String password;
	/**
	* 盐值
	*/
	private String salt;
	/**
	* 用户姓名
	*/
	@TableField(whereStrategy = FieldStrategy.NOT_EMPTY, condition = SqlCondition.LIKE)
	private String username;
	/**
	* 用户昵称
	*/
	private String nickName;
	/**
	* 联系电话
	*/
	private String telephone;
	/**
	* 电子邮箱
	*/
	private String email;
	/**
	* 性别，0未知，1男，2女，3其它
	*/
	private Integer gender;

	/**
	 * 头像链接
	 **/
	private String avatar;

	/**
	 * 账户状态，0保留，1正常，2锁定
	 **/
	private Integer status;

	@TableField(exist = false)
	private String token;

	@TableField(exist = false)
	@JsonSerialize(using = LongArray2StringSerialize.class)
	private List<Long> roleIdList;
}
